<?php
/**
 * Enter description here ...
 * @author Micou13630
 */
class TreeNodeType extends Bones implements IRenderable {
	
	protected $name;
	protected $title;
	protected $icon;
	
	protected $id;
	protected $parentId;
	
	protected $children;
	
	protected $isFolder;
	protected $enabled;
	
	protected $canAcceptDrop;
	protected $canDrag;
	
	/**
	 * Constructeur
	 * @param unknown_type $name
	 * @param unknown_type $title
	 */
	public function TreeNodeType($name, $title = null, $id = null, $parentId = null) {
		parent::Bones();
		
		$this->children = array();
		
		$this->name = $name;
		$this->title = $title;
		$this->id = $id;
		$this->parentId = $parentId;
	}
	
	/**
	 * Permet d'ajouter un fils a cette node
	 * @param TreeNodeType $children
	 */
	public function addChildren(TreeNodeType $children) {
		$this->children[] = $children;
	}
	
	/**
	 * Implementation de object
	 * @see IRenderable::object()
	 */
	public function object() {
		return null;
	}

	/**
	 * Implementation de properties
	 * @see IRenderable::properties()
	 */
	public function properties() {
		return parent::getProp($this);
	}
	
	/**
	 * Implementation de scLog
	 * @see IRenderable::scLog()
	 */
	public function scLog() {
		//
	}

	/**
	 * Implementation de render
	 * @see IScreen::render()
	 */
	public function render() {
		return "{".$this->properties()."}";
	}
}
?>